home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / freeWAIS-sf-1.1 / ir / field_l.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-10  |  38.4 KB  |  1,511 lines

  1. /* A lexical scanner generated by flex */
  2.  
  3. /* Scanner skeleton version:
  4.  * $Header: flex.skl,v 1.2 94/01/04 14:33:15 vern Exp $
  5.  */
  6.  
  7. #define FLEX_SCANNER
  8.  
  9. #include <stdio.h>
  10.  
  11.  
  12. /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  13. #ifdef c_plusplus
  14. #ifndef __cplusplus
  15. #define __cplusplus
  16. #endif
  17. #endif
  18.  
  19.  
  20. #ifdef __cplusplus
  21.  
  22. #include <stdlib.h>
  23. #include <unistd.h>
  24.  
  25. /* Use prototypes in function declarations. */
  26. #define YY_USE_PROTOS
  27.  
  28. /* The "const" storage-class-modifier is valid. */
  29. #define YY_USE_CONST
  30.  
  31. #else    /* ! __cplusplus */
  32.  
  33. #ifdef __STDC__
  34.  
  35. #define YY_USE_PROTOS
  36. #define YY_USE_CONST
  37.  
  38. #endif    /* __STDC__ */
  39. #endif    /* ! __cplusplus */
  40.  
  41.  
  42. #ifdef __TURBOC__
  43. #define YY_USE_CONST
  44. #endif
  45.  
  46.  
  47. #ifndef YY_USE_CONST
  48. #ifndef const
  49. #define const
  50. #endif
  51. #endif
  52.  
  53.  
  54. #ifdef YY_USE_PROTOS
  55. #define YY_PROTO(proto) proto
  56. #else
  57. #define YY_PROTO(proto) ()
  58. #endif
  59.  
  60. /* Returned upon end-of-file. */
  61. #define YY_NULL 0
  62.  
  63. /* Promotes a possibly negative, possibly signed char to an unsigned
  64.  * integer for use as an array index.  If the signed char is negative,
  65.  * we want to instead treat it as an 8-bit unsigned char, hence the
  66.  * double cast.
  67.  */
  68. #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  69.  
  70. /* Enter a start condition.  This macro really ought to take a parameter,
  71.  * but we do it the disgusting crufty way forced on us by the ()-less
  72.  * definition of BEGIN.
  73.  */
  74. #define BEGIN yy_start = 1 + 2 *
  75.  
  76. /* Translate the current start state into a value that can be later handed
  77.  * to BEGIN to return to the state.
  78.  */
  79. #define YY_START ((yy_start - 1) / 2)
  80.  
  81. /* Action number for EOF rule of a given start state. */
  82. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  83.  
  84. /* Special action meaning "start processing a new file".  Now included
  85.  * only for backward compatibility with previous versions of flex.
  86.  */
  87. #define YY_NEW_FILE yyrestart( yyin )
  88.  
  89. #define YY_END_OF_BUFFER_CHAR 0
  90.  
  91. /* Size of default input buffer. */
  92. #define YY_BUF_SIZE 16384
  93.  
  94. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  95.  
  96. extern int yyleng;
  97. extern FILE *yyin, *yyout;
  98.  
  99. #ifdef __cplusplus
  100. extern "C" {
  101. #endif
  102.     extern int yywrap YY_PROTO(( void ));
  103. #ifdef __cplusplus
  104.     }
  105. #endif
  106.  
  107. #define EOB_ACT_CONTINUE_SCAN 0
  108. #define EOB_ACT_END_OF_FILE 1
  109. #define EOB_ACT_LAST_MATCH 2
  110.  
  111. /* The funky do-while in the following #define is used to turn the definition
  112.  * int a single C statement (which needs a semi-colon terminator).  This
  113.  * avoids problems with code like:
  114.  *
  115.  *     if ( condition_holds )
  116.  *        yyless( 5 );
  117.  *    else
  118.  *        do_something_else();
  119.  *
  120.  * Prior to using the do-while the compiler would get upset at the
  121.  * "else" because it interpreted the "if" statement as being all
  122.  * done when it reached the ';' after the yyless() call.
  123.  */
  124.  
  125. /* Return all but the first 'n' matched characters back to the input stream. */
  126.  
  127. #define yyless(n) \
  128.     do \
  129.         { \
  130.         /* Undo effects of setting up yytext. */ \
  131.         *yy_cp = yy_hold_char; \
  132.         yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
  133.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  134.         } \
  135.     while ( 0 )
  136.  
  137. #define unput(c) yyunput( c, yytext_ptr )
  138.  
  139.  
  140. struct yy_buffer_state
  141.     {
  142.     FILE *yy_input_file;
  143.  
  144.     char *yy_ch_buf;        /* input buffer */
  145.     char *yy_buf_pos;        /* current position in input buffer */
  146.  
  147.     /* Size of input buffer in bytes, not including room for EOB
  148.      * characters.
  149.      */
  150.     int yy_buf_size;
  151.  
  152.     /* Number of characters read into yy_ch_buf, not including EOB
  153.      * characters.
  154.      */
  155.     int yy_n_chars;
  156.  
  157.     /* Whether this is an "interactive" input source; if so, and
  158.      * if we're using stdio for input, then we want to use getc()
  159.      * instead of fread(), to make sure we stop fetching input after
  160.      * each newline.
  161.      */
  162.     int yy_is_interactive;
  163.  
  164.     /* Whether to try to fill the input buffer when we reach the
  165.      * end of it.
  166.      */
  167.     int yy_fill_buffer;
  168.  
  169.     /* Whether we've seen an EOF on this buffer. */
  170.     int yy_eof_status;
  171. #define EOF_NOT_SEEN 0
  172.     /* "Pending" happens when the EOF has been seen but there's still
  173.      * some text to process.  Note that when we actually see the EOF,
  174.      * we switch the status back to "not seen" (via yyrestart()), so
  175.      * that the user can continue scanning by just pointing yyin at
  176.      * a new input file.
  177.      */
  178. #define EOF_PENDING 1
  179.     };
  180.  
  181. static YY_BUFFER_STATE yy_current_buffer = 0;
  182.  
  183. /* We provide macros for accessing buffer states in case in the
  184.  * future we want to put the buffer states in a more general
  185.  * "scanner state".
  186.  */
  187. #define YY_CURRENT_BUFFER yy_current_buffer
  188.  
  189.  
  190. /* yy_hold_char holds the character lost when yytext is formed. */
  191. static char yy_hold_char;
  192.  
  193. static int yy_n_chars;        /* number of characters read into yy_ch_buf */
  194.  
  195.  
  196. int yyleng;
  197.  
  198. /* Points to current character in buffer. */
  199. static char *yy_c_buf_p = (char *) 0;
  200. static int yy_init = 1;        /* whether we need to initialize */
  201. static int yy_start = 0;    /* start state number */
  202.  
  203. /* Flag which is used to allow yywrap()'s to do buffer switches
  204.  * instead of setting up a fresh yyin.  A bit of a hack ...
  205.  */
  206. static int yy_did_buffer_switch_on_eof;
  207.  
  208. static void yyunput YY_PROTO(( int c, char *buf_ptr ));
  209. void yyrestart YY_PROTO(( FILE *input_file ));
  210. void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
  211. void yy_load_buffer_state YY_PROTO(( void ));
  212. YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
  213. void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  214. void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
  215.  
  216. static int yy_start_stack_ptr = 0;
  217. static int yy_start_stack_depth = 0;
  218. static int *yy_start_stack = 0;
  219. static void yy_push_state YY_PROTO(( int new_state ));
  220. static void yy_pop_state YY_PROTO(( void ));
  221. static int yy_top_state YY_PROTO(( void ));
  222.  
  223. #ifndef yytext_ptr
  224. static void yy_flex_strcpy YY_PROTO(( char *, const char * ));
  225. #endif
  226.  
  227. static void *yy_flex_alloc YY_PROTO(( unsigned int ));
  228. static void *yy_flex_realloc YY_PROTO(( void *ptr, unsigned int ));
  229. static void yy_flex_free YY_PROTO(( void * ));
  230.  
  231. #define yy_new_buffer yy_create_buffer
  232.  
  233. #define INITIAL 0
  234. typedef unsigned char YY_CHAR;
  235. typedef int yy_state_type;
  236. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  237. extern char *yytext;
  238. #define yytext_ptr yytext
  239.  
  240. #ifdef __cplusplus
  241. static int yyinput YY_PROTO(( void ));
  242. #else
  243. static int input YY_PROTO(( void ));
  244. #endif
  245.  
  246. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  247. static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
  248. static int yy_get_next_buffer YY_PROTO(( void ));
  249. static void yy_fatal_error YY_PROTO(( const char msg[] ));
  250.  
  251. /* Done after the current pattern has been matched and before the
  252.  * corresponding action - sets up yytext.
  253.  */
  254. #define YY_DO_BEFORE_ACTION \
  255.     yytext_ptr = yy_bp; \
  256.     yytext_ptr -= yy_more_len; \
  257.     yyleng = yy_cp - yytext_ptr; \
  258.     yy_hold_char = *yy_cp; \
  259.     *yy_cp = '\0'; \
  260.     yy_c_buf_p = yy_cp;
  261.  
  262. #define YY_END_OF_BUFFER 26
  263. static const short int yy_accept[132] =
  264.     {   0,
  265.         0,    0,   26,   24,    9,   24,   25,   25,    2,   24,
  266.        24,   24,   24,   24,   24,   24,   24,   24,   24,   24,
  267.        24,   24,   24,    0,   23,    0,    1,    2,   24,   24,
  268.        24,   24,   24,   24,   24,   24,   24,   24,   24,   24,
  269.        24,   24,   24,   24,   24,   24,   23,   24,   24,   24,
  270.        24,   24,   24,   24,   24,   24,   24,   24,   24,   24,
  271.        24,   19,   24,   24,   24,   24,   24,   24,   24,   24,
  272.        24,   24,   24,   16,   24,   24,   24,   24,   24,   12,
  273.        24,   24,   24,   21,   24,    4,   24,   24,   24,   24,
  274.        24,   24,   24,   13,   24,   24,   20,   24,   24,   18,
  275.  
  276.        24,   24,   24,   24,   24,   15,   14,   11,   24,   24,
  277.        22,    3,   24,   24,   24,   24,   10,   24,   24,    7,
  278.        24,   24,    8,   24,    5,   24,    6,   24,   24,   17,
  279.         0
  280.     } ;
  281.  
  282. static const int yy_ec[256] =
  283.     {   0,
  284.         1,    1,    1,    1,    1,    1,    1,    1,    2,    2,
  285.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  286.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  287.         1,    2,    1,    3,    1,    1,    1,    1,    1,    4,
  288.         4,    1,    1,    1,    5,    1,    6,    7,    7,    7,
  289.         7,    7,    7,    7,    7,    7,    7,    1,    1,    8,
  290.         4,    9,    1,    1,   10,   11,   12,   13,   14,    1,
  291.        15,   16,   17,    1,    1,   18,    1,   19,   20,   21,
  292.         1,   22,   23,   24,   25,    1,    1,   26,    1,    1,
  293.         1,    1,    1,    1,    1,    1,   27,    1,   28,   29,
  294.  
  295.        30,   31,   32,   33,   34,    1,    1,   35,   36,   37,
  296.        38,    1,    1,   39,   40,   41,   42,    1,    1,    1,
  297.        43,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  298.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  299.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  300.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  301.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  302.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  303.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  304.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  305.  
  306.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  307.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  308.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  309.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  310.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  311.         1,    1,    1,    1,    1
  312.     } ;
  313.  
  314. static const int yy_meta[44] =
  315.     {   0,
  316.         1,    2,    1,    2,    1,    2,    1,    1,    1,    1,
  317.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  318.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  319.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  320.         1,    1,    1
  321.     } ;
  322.  
  323. static const short int yy_base[137] =
  324.     {   0,
  325.         0,   42,  167,    0,  168,   10,  168,  160,  158,   57,
  326.       144,  145,  147,  141,  144,  139,  144,  130,  118,  114,
  327.       124,    0,   24,  150,    0,  146,  168,  144,  123,  112,
  328.       114,  117,  119,  103,  114,  119,  122,  122,  128,  119,
  329.       113,  111,   93,   98,    2,  107,  168,   92,  103,  101,
  330.       103,   86,   92,   99,  110,  114,  104,  113,  103,  102,
  331.        96,    0,   78,   82,   83,   77,   85,  105,   78,   83,
  332.        73,   80,   71,    0,   98,   85,   88,   88,   82,    0,
  333.        60,   55,   52,    0,   75,    0,   54,   46,   38,   40,
  334.        38,   58,   61,    0,   48,   59,    0,   38,   38,    0,
  335.  
  336.        60,   34,   26,   30,   33,    0,    0,    0,   35,   21,
  337.         0,    0,   19,   46,   26,   47,    0,   19,   17,    0,
  338.        33,    9,    0,   29,    0,    0,    0,    2,    0,    0,
  339.       168,   96,    0,   98,  100,  102
  340.     } ;
  341.  
  342. static const short int yy_def[137] =
  343.     {   0,
  344.       132,  132,  131,  133,  131,  134,  131,  135,  133,  133,
  345.       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
  346.       133,  133,  134,  136,  133,  135,  131,  133,  133,  133,
  347.       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
  348.       133,  133,  133,  133,  133,  133,  131,  133,  133,  133,
  349.       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
  350.       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
  351.       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
  352.       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
  353.       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
  354.  
  355.       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
  356.       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
  357.       133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
  358.         0,  131,  131,  131,  131,  131
  359.     } ;
  360.  
  361. static const short int yy_nxt[212] =
  362.     {   0,
  363.        22,    5,    6,    7,  131,    8,    9,   10,  130,  131,
  364.        11,   24,   25,   24,   12,   24,   13,   14,  131,  131,
  365.        15,  131,   16,   17,  131,   24,   25,   24,   18,   24,
  366.       129,   64,  131,  131,  131,   19,  128,  127,  126,   20,
  367.        65,  125,   21,    5,    6,    7,  124,    8,    9,   10,
  368.       123,  122,   11,  121,  120,  119,   12,  118,   13,   14,
  369.       117,  116,   15,  115,   16,   17,  114,  113,  112,  111,
  370.        18,  110,  109,  108,  107,  106,  105,   19,  104,  103,
  371.       102,   20,  101,  100,   21,   29,   30,   31,   99,   32,
  372.        98,   33,   97,   34,   96,   35,    4,    4,   23,   23,
  373.  
  374.        26,   26,   24,   24,   95,   94,   93,   92,   91,   90,
  375.        89,   88,   87,   86,   85,   84,   83,   82,   81,   80,
  376.        79,   78,   77,   76,   75,   74,   73,   72,   71,   70,
  377.        69,   68,   67,   66,   63,   62,   61,   60,   59,   58,
  378.        57,   56,   55,   54,   53,   52,   51,   50,   49,   48,
  379.        28,   27,   47,   46,   45,   44,   43,   42,   41,   40,
  380.        39,   38,   37,   36,   28,   27,  131,    3,  131,  131,
  381.       131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
  382.       131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
  383.       131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
  384.  
  385.       131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
  386.       131
  387.     } ;
  388.  
  389. static const short int yy_chk[212] =
  390.     {   0,
  391.       133,    1,    1,    1,    0,    1,    1,    1,  129,    0,
  392.         1,    6,    6,    6,    1,    6,    1,    1,    0,    0,
  393.         1,    0,    1,    1,    0,   23,   23,   23,    1,   23,
  394.       128,   45,    0,    0,    0,    1,  126,  124,  122,    1,
  395.        45,  121,    1,    2,    2,    2,  119,    2,    2,    2,
  396.       118,  116,    2,  115,  114,  113,    2,  110,    2,    2,
  397.       109,  105,    2,  104,    2,    2,  103,  102,  101,   99,
  398.         2,   98,   96,   95,   93,   92,   91,    2,   90,   89,
  399.        88,    2,   87,   85,    2,   10,   10,   10,   83,   10,
  400.        82,   10,   81,   10,   79,   10,  132,  132,  134,  134,
  401.  
  402.       135,  135,  136,  136,   78,   77,   76,   75,   73,   72,
  403.        71,   70,   69,   68,   67,   66,   65,   64,   63,   61,
  404.        60,   59,   58,   57,   56,   55,   54,   53,   52,   51,
  405.        50,   49,   48,   46,   44,   43,   42,   41,   40,   39,
  406.        38,   37,   36,   35,   34,   33,   32,   31,   30,   29,
  407.        28,   26,   24,   21,   20,   19,   18,   17,   16,   15,
  408.        14,   13,   12,   11,    9,    8,    3,  131,  131,  131,
  409.       131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
  410.       131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
  411.       131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
  412.  
  413.       131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
  414.       131
  415.     } ;
  416.  
  417. static yy_state_type yy_last_accepting_state;
  418. static char *yy_last_accepting_cpos;
  419.  
  420. /* The intent behind this definition is that it'll catch
  421.  * any uses of REJECT which flex missed.
  422.  */
  423. #define REJECT reject_used_but_not_detected
  424. static int yy_more_flag = 0;
  425. static int yy_more_len = 0;
  426. #define yymore() (yy_more_flag = 1)
  427. #define YY_MORE_ADJ yy_more_len
  428. char *yytext;
  429. # line 1 "field_l.l"
  430. # line 2 "field_l.l"
  431. /*                               -*- Mode: C -*- 
  432.  * field_l.l -- 
  433.  * ITIID           : $ITI$ $Header $__Header$
  434.  * Author          : Ulrich Pfeifer
  435.  * Created On      : Tue Feb 15 16:03:22 1994
  436.  * Last Modified By: Ulrich Pfeifer
  437.  * Last Modified On: Thu Dec 22 14:56:14 1994
  438.  * Update Count    : 225
  439.  * Status          : Unknown, Use with caution!
  440.  */
  441.  
  442.  
  443. /* HISTORY 
  444.  * 10-Mar-1994        Ulrich Pfeifer    
  445.  *    added support for backslash escaped '/'.
  446.  */
  447.  
  448. #include "field_token.h"
  449. #include "cutil.h"
  450. #ifdef FLEX_SCANNER
  451. int yylineno = 0;
  452. #define UPDATELINENO if (yytext[0]=='\n') yylineno++;
  453. #undef yywrap
  454. #define yywrap() (1)
  455. #else
  456. #define UPDATELINENO
  457. #endif
  458.  
  459.  
  460. #undef  ECHO
  461. #define ECHO 
  462.  
  463. /* Macros after this point can all be overridden by user definitions in
  464.  * section 1.
  465.  */
  466.  
  467. #ifdef YY_MALLOC_DECL
  468. YY_MALLOC_DECL
  469. #else
  470. #if __STDC__
  471. #ifndef __cplusplus
  472. #include <stdlib.h>
  473. #endif
  474. #else
  475. /* Just try to get by without declaring the routines.  This will fail
  476.  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
  477.  * or sizeof(void*) != sizeof(int).
  478.  */
  479. #endif
  480. #endif
  481.  
  482. /* Amount of stuff to slurp up with each read. */
  483. #ifndef YY_READ_BUF_SIZE
  484. #define YY_READ_BUF_SIZE 8192
  485. #endif
  486.  
  487. /* Copy whatever the last rule matched to the standard output. */
  488.  
  489. #ifndef ECHO
  490. /* This used to be an fputs(), but since the string might contain NUL's,
  491.  * we now use fwrite().
  492.  */
  493. #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
  494. #endif
  495.  
  496. /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  497.  * is returned in "result".
  498.  */
  499. #ifndef YY_INPUT
  500. #define YY_INPUT(buf,result,max_size) \
  501.     if ( yy_current_buffer->yy_is_interactive ) \
  502.         { \
  503.         int c = getc( yyin ); \
  504.         result = c == EOF ? 0 : 1; \
  505.         buf[0] = (char) c; \
  506.         } \
  507.     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
  508.           && ferror( yyin ) ) \
  509.         YY_FATAL_ERROR( "input in flex scanner failed" );
  510. #endif
  511.  
  512. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  513.  * we don't want an extra ';' after the "return" because that will cause
  514.  * some compilers to complain about unreachable statements.
  515.  */
  516. #ifndef yyterminate
  517. #define yyterminate() return YY_NULL
  518. #endif
  519.  
  520. /* Number of entries by which start-condition stack grows. */
  521. #ifndef YY_START_STACK_INCR
  522. #define YY_START_STACK_INCR 25
  523. #endif
  524.  
  525. /* Report a fatal error. */
  526. #ifndef YY_FATAL_ERROR
  527. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  528. #endif
  529.  
  530. /* Default declaration of generated scanner - a define so the user can
  531.  * easily add parameters.
  532.  */
  533. #ifndef YY_DECL
  534. #define YY_DECL int yylex YY_PROTO(( void ))
  535. #endif
  536.  
  537. /* Code executed at the beginning of each rule, after yytext and yyleng
  538.  * have been set up.
  539.  */
  540. #ifndef YY_USER_ACTION
  541. #define YY_USER_ACTION
  542. #endif
  543.  
  544. /* Code executed at the end of each rule. */
  545. #ifndef YY_BREAK
  546. #define YY_BREAK break;
  547. #endif
  548.  
  549. YY_DECL
  550.     {
  551.     register yy_state_type yy_current_state;
  552.     register char *yy_cp, *yy_bp;
  553.     register int yy_act;
  554.  
  555. # line 35 "field_l.l"
  556.  
  557.  
  558.     if ( yy_init )
  559.         {
  560. #ifdef YY_USER_INIT
  561.         YY_USER_INIT;
  562. #endif
  563.  
  564.         if ( ! yy_start )
  565.             yy_start = 1;    /* first start state */
  566.  
  567.         if ( ! yyin )
  568.             yyin = stdin;
  569.  
  570.         if ( ! yyout )
  571.             yyout = stdout;
  572.  
  573.         if ( yy_current_buffer )
  574.             yy_init_buffer( yy_current_buffer, yyin );
  575.         else
  576.             yy_current_buffer =
  577.                 yy_create_buffer( yyin, YY_BUF_SIZE );
  578.  
  579.         yy_load_buffer_state();
  580.  
  581.         yy_init = 0;
  582.         }
  583.  
  584.     while ( 1 )        /* loops until end-of-file is reached */
  585.         {
  586.         yy_more_len = 0;
  587.         if ( yy_more_flag )
  588.             {
  589.             yy_more_len = yyleng;
  590.             yy_more_flag = 0;
  591.             }
  592.         yy_cp = yy_c_buf_p;
  593.  
  594.         /* Support of yytext. */
  595.         *yy_cp = yy_hold_char;
  596.  
  597.         /* yy_bp points to the position in yy_ch_buf of the start of
  598.          * the current run.
  599.          */
  600.         yy_bp = yy_cp;
  601.  
  602.         yy_current_state = yy_start;
  603. yy_match:
  604.         do
  605.             {
  606.             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  607.             if ( yy_accept[yy_current_state] )
  608.                 {
  609.                 yy_last_accepting_state = yy_current_state;
  610.                 yy_last_accepting_cpos = yy_cp;
  611.                 }
  612.             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  613.                 {
  614.                 yy_current_state = (int) yy_def[yy_current_state];
  615.                 if ( yy_current_state >= 132 )
  616.                     yy_c = yy_meta[(unsigned int) yy_c];
  617.                 }
  618.             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  619.             ++yy_cp;
  620.             }
  621.         while ( yy_base[yy_current_state] != 168 );
  622.  
  623. yy_find_action:
  624.         yy_act = yy_accept[yy_current_state];
  625.  
  626.         YY_DO_BEFORE_ACTION;
  627.  
  628.  
  629. do_action:    /* This label is used only to access EOF actions. */
  630.  
  631.  
  632.         switch ( yy_act )
  633.     { /* beginning of action switch */
  634.             case 0: /* must back up */
  635.             /* undo the effects of YY_DO_BEFORE_ACTION */
  636.             *yy_cp = yy_hold_char;
  637.             yy_cp = yy_last_accepting_cpos;
  638.             yy_current_state = yy_last_accepting_state;
  639.             goto yy_find_action;
  640.  
  641. case 1:
  642. YY_USER_ACTION
  643. # line 36 "field_l.l"
  644. { ECHO; 
  645.           if (yytext[yyleng-2] == '\\') { 
  646.                 /* the ending '/' was escaped, lets get the rest */
  647.                 unput(yytext[yyleng-1]);/* yes yyless() is better */ 
  648.                 yymore(); 
  649.           } else {
  650.                 /* Flex bug?  When there is more than one escape, the
  651.                    call to unput adds two chars to the from of yytext.
  652.                    We now skip them :-(
  653.                    */
  654.                 char *s = yytext;
  655.                 while (*s && *s != '/') s++;
  656.                 yylval.sval = strdup(s);
  657.  
  658.         { char *s = yylval.sval, *t = yylval.sval;
  659.           while (*s) { 
  660.             if (*s == '\\') {
  661.               if (s[1] == '/') {
  662.             s+=1; /* escaped '/' */
  663.               } else if (s[1] == '\\') { 
  664.             s+=1; /* double \\ */
  665.               } else if (s[1] >= 'A' && s[1] <= 'Z') { 
  666.             s[1] = s[1]-'A'+1;  /* map of ASCII character set */
  667.             s+=1;
  668.               }    else if (s[1] == 'n') {
  669.             s[1] = '\n'; /* newline */
  670.             s+=1;
  671.               }    else if (s[1] == 'r') {
  672.             s[1] = '\r'; /* cr */
  673.             s+=1;
  674.               }    else if (s[1] == 'f') {
  675.             s[1] = '\f'; /* form feed */
  676.             s+=1;
  677.               } else {       /* let the escaped char unmodified */
  678.             s+=1;
  679.               }
  680.             }
  681.             *(t++) = *(s++);
  682.           }
  683.           *t = *s; /* should be '\0' */
  684.           /* fprintf(stderr,"\nregexp:%s:\n", yylval.sval);  */
  685.           return(REGEXP); 
  686.         }
  687.           }
  688.         }
  689.     YY_BREAK
  690. case 2:
  691. YY_USER_ACTION
  692. # line 81 "field_l.l"
  693. { ECHO; yylval.ival = atoi(yytext); return(INT); }
  694.     YY_BREAK
  695. case 3:
  696. YY_USER_ACTION
  697. # line 82 "field_l.l"
  698. { ECHO; return(FIELD); }
  699.     YY_BREAK
  700. case 4:
  701. YY_USER_ACTION
  702. # line 83 "field_l.l"
  703. { ECHO; return(END); }
  704.     YY_BREAK
  705. case 5:
  706. YY_USER_ACTION
  707. # line 84 "field_l.l"
  708. { ECHO; return(NUMERIC); }
  709.     YY_BREAK
  710. case 6:
  711. YY_USER_ACTION
  712. # line 85 "field_l.l"
  713. { ECHO; return(HEADLINE); }
  714.     YY_BREAK
  715. case 7:
  716. YY_USER_ACTION
  717. # line 86 "field_l.l"
  718. { ECHO; return(LAYOUT); }
  719.     YY_BREAK
  720. case 8:
  721. YY_USER_ACTION
  722. # line 87 "field_l.l"
  723. { ECHO; return(STEMMING); }
  724.     YY_BREAK
  725. case 9:
  726. YY_USER_ACTION
  727. # line 88 "field_l.l"
  728. { ECHO; UPDATELINENO; }
  729.     YY_BREAK
  730. case 10:
  731. YY_USER_ACTION
  732. # line 89 "field_l.l"
  733. { /* tung: it is very bad style to use the strings here! use a enum (up) */
  734.                     ECHO; yylval.sval = strdup(yytext); return(ISOUNDEX); }
  735.     YY_BREAK
  736. case 11:
  737. YY_USER_ACTION
  738. # line 91 "field_l.l"
  739. { ECHO; yylval.sval = strdup(yytext); return(IPHONIX); }
  740.     YY_BREAK
  741. case 12:
  742. YY_USER_ACTION
  743. # line 92 "field_l.l"
  744. { ECHO; yylval.sval = strdup(yytext); return(ITEXT); }
  745.     YY_BREAK
  746. case 13:
  747. YY_USER_ACTION
  748. # line 93 "field_l.l"
  749. { ECHO; return(LOCAL); }
  750.     YY_BREAK
  751. case 14:
  752. YY_USER_ACTION
  753. # line 94 "field_l.l"
  754. { ECHO; return(IGNORE); }
  755.     YY_BREAK
  756. case 15:
  757. YY_USER_ACTION
  758. # line 95 "field_l.l"
  759. { ECHO; return(GLOBAL); }
  760.     YY_BREAK
  761. case 16:
  762. YY_USER_ACTION
  763. # line 96 "field_l.l"
  764. { ECHO; return(BOTH); }
  765.     YY_BREAK
  766. case 17:
  767. YY_USER_ACTION
  768. # line 97 "field_l.l"
  769. { ECHO; return(RECORD_END); }
  770.     YY_BREAK
  771. case 18:
  772. YY_USER_ACTION
  773. # line 98 "field_l.l"
  774. { ECHO; /* yylval.sval = strdup(yytext); (up) */ return(DATE); }
  775.     YY_BREAK
  776. case 19:
  777. YY_USER_ACTION
  778. # line 99 "field_l.l"
  779. { ECHO; yylval.sval = "day"; return(DAY); }
  780.     YY_BREAK
  781. case 20:
  782. YY_USER_ACTION
  783. # line 100 "field_l.l"
  784. { ECHO; yylval.sval = "month"; return(MONTH); }
  785.     YY_BREAK
  786. case 21:
  787. YY_USER_ACTION
  788. # line 101 "field_l.l"
  789. { ECHO; yylval.sval = "year"; return(YEAR); }
  790.     YY_BREAK
  791. case 22:
  792. YY_USER_ACTION
  793. # line 102 "field_l.l"
  794. { ECHO; yylval.sval = "string";  return(STRING); }
  795.     YY_BREAK
  796. case 23:
  797. YY_USER_ACTION
  798. # line 103 "field_l.l"
  799. { ECHO; 
  800.                     yylval.sval = strdup(yytext+1); 
  801.                     yylval.sval[strlen(yylval.sval)-1] = '\0'; 
  802.                     return(DESCRIPTION); }
  803.     YY_BREAK
  804. case 24:
  805. YY_USER_ACTION
  806. # line 107 "field_l.l"
  807. { ECHO; yylval.sval = strdup(yytext); return(WORD); }
  808.     YY_BREAK
  809. case 25:
  810. YY_USER_ACTION
  811. # line 108 "field_l.l"
  812. ECHO;
  813.     YY_BREAK
  814. case YY_STATE_EOF(INITIAL):
  815.     yyterminate();
  816.  
  817.     case YY_END_OF_BUFFER:
  818.         {
  819.         /* Amount of text matched not including the EOB char. */
  820.         int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1;
  821.  
  822.         /* Undo the effects of YY_DO_BEFORE_ACTION. */
  823.         *yy_cp = yy_hold_char;
  824.  
  825.         if ( yy_current_buffer->yy_input_file != yyin )
  826.             {
  827.             /* This can happen if we scan a file, yywrap() returns
  828.              * 1, and then later the user points yyin at a new
  829.              * file to resume scanning.  We have to assure
  830.              * consistency between yy_current_buffer and our
  831.              * globals.  Here is the right place to do so, because
  832.              * this is the first action (other than possibly a
  833.              * back-up) that will match for the new input file.
  834.              */
  835.             yy_current_buffer->yy_input_file = yyin;
  836.             yy_n_chars = yy_current_buffer->yy_n_chars;
  837.             }
  838.  
  839.         /* Note that here we test for yy_c_buf_p "<=" to the position
  840.          * of the first EOB in the buffer, since yy_c_buf_p will
  841.          * already have been incremented past the NUL character
  842.          * (since all states make transitions on EOB to the
  843.          * end-of-buffer state).  Contrast this with the test
  844.          * in input().
  845.          */
  846.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  847.             { /* This was really a NUL. */
  848.             yy_state_type yy_next_state;
  849.  
  850.             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
  851.  
  852.             yy_current_state = yy_get_previous_state();
  853.  
  854.             /* Okay, we're now positioned to make the NUL
  855.              * transition.  We couldn't have
  856.              * yy_get_previous_state() go ahead and do it
  857.              * for us because it doesn't know how to deal
  858.              * with the possibility of jamming (and we don't
  859.              * want to build jamming into it because then it
  860.              * will run more slowly).
  861.              */
  862.  
  863.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  864.  
  865.             yy_bp = yytext_ptr + YY_MORE_ADJ;
  866.  
  867.             if ( yy_next_state )
  868.                 {
  869.                 /* Consume the NUL. */
  870.                 yy_cp = ++yy_c_buf_p;
  871.                 yy_current_state = yy_next_state;
  872.                 goto yy_match;
  873.                 }
  874.  
  875.             else
  876.                 {
  877.                 goto yy_find_action;
  878.                 }
  879.             }
  880.  
  881.         else switch ( yy_get_next_buffer() )
  882.             {
  883.             case EOB_ACT_END_OF_FILE:
  884.                 {
  885.                 yy_did_buffer_switch_on_eof = 0;
  886.  
  887.                 if ( yywrap() )
  888.                     {
  889.                     /* Note: because we've taken care in
  890.                      * yy_get_next_buffer() to have set up
  891.                      * yytext, we can now set up
  892.                      * yy_c_buf_p so that if some total
  893.                      * hoser (like flex itself) wants to
  894.                      * call the scanner after we return the
  895.                      * YY_NULL, it'll still work - another
  896.                      * YY_NULL will get returned.
  897.                      */
  898.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  899.  
  900.                     yy_act = YY_STATE_EOF(YY_START);
  901.                     goto do_action;
  902.                     }
  903.  
  904.                 else
  905.                     {
  906.                     if ( ! yy_did_buffer_switch_on_eof )
  907.                         YY_NEW_FILE;
  908.                     }
  909.                 break;
  910.                 }
  911.  
  912.             case EOB_ACT_CONTINUE_SCAN:
  913.                 yy_c_buf_p =
  914.                     yytext_ptr + yy_amount_of_matched_text;
  915.  
  916.                 yy_current_state = yy_get_previous_state();
  917.  
  918.                 yy_cp = yy_c_buf_p;
  919.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  920.                 goto yy_match;
  921.  
  922.             case EOB_ACT_LAST_MATCH:
  923.                 yy_c_buf_p =
  924.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  925.  
  926.                 yy_current_state = yy_get_previous_state();
  927.  
  928.                 yy_cp = yy_c_buf_p;
  929.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  930.                 goto yy_find_action;
  931.             }
  932.         break;
  933.         }
  934.  
  935.     default:
  936.         YY_FATAL_ERROR(
  937.             "fatal flex scanner internal error--no action found" );
  938.     } /* end of action switch */
  939.         } /* end of scanning one token */
  940.     } /* end of yylex */
  941.  
  942.  
  943. /* yy_get_next_buffer - try to read in a new buffer
  944.  *
  945.  * Returns a code representing an action:
  946.  *    EOB_ACT_LAST_MATCH -
  947.  *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  948.  *    EOB_ACT_END_OF_FILE - end of file
  949.  */
  950.  
  951. static int yy_get_next_buffer()
  952.     {
  953.     register char *dest = yy_current_buffer->yy_ch_buf;
  954.     register char *source = yytext_ptr - 1; /* copy prev. char, too */
  955.     register int number_to_move, i;
  956.     int ret_val;
  957.  
  958.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  959.         YY_FATAL_ERROR(
  960.         "fatal flex scanner internal error--end of buffer missed" );
  961.  
  962.     if ( yy_current_buffer->yy_fill_buffer == 0 )
  963.         { /* Don't try to fill the buffer, so this is an EOF. */
  964.         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
  965.             {
  966.             /* We matched a singled characater, the EOB, so
  967.              * treat this as a final EOF.
  968.              */
  969.             return EOB_ACT_END_OF_FILE;
  970.             }
  971.  
  972.         else
  973.             {
  974.             /* We matched some text prior to the EOB, first
  975.              * process it.
  976.              */
  977.             return EOB_ACT_LAST_MATCH;
  978.             }
  979.         }
  980.  
  981.     /* Try to read more data. */
  982.  
  983.     /* First move last chars to start of buffer. */
  984.     number_to_move = yy_c_buf_p - yytext_ptr;
  985.  
  986.     for ( i = 0; i < number_to_move; ++i )
  987.         *(dest++) = *(source++);
  988.  
  989.     if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
  990.         /* don't do the read, it's not guaranteed to return an EOF,
  991.          * just force an EOF
  992.          */
  993.         yy_n_chars = 0;
  994.  
  995.     else
  996.         {
  997.         int num_to_read =
  998.             yy_current_buffer->yy_buf_size - number_to_move - 1;
  999.  
  1000.         while ( num_to_read <= 0 )
  1001.             { /* Not enough room in the buffer - grow it. */
  1002. #ifdef YY_USES_REJECT
  1003.             YY_FATAL_ERROR(
  1004. "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
  1005. #else
  1006.  
  1007.             /* just a shorter name for the current buffer */
  1008.             YY_BUFFER_STATE b = yy_current_buffer;
  1009.  
  1010.             int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;
  1011.  
  1012.             b->yy_buf_size *= 2;
  1013.             b->yy_ch_buf = (char *)
  1014.                 yy_flex_realloc( (void *) b->yy_ch_buf,
  1015.                          b->yy_buf_size );
  1016.  
  1017.             if ( ! b->yy_ch_buf )
  1018.                 YY_FATAL_ERROR(
  1019.                 "fatal error - scanner input buffer overflow" );
  1020.  
  1021.             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  1022.  
  1023.             num_to_read = yy_current_buffer->yy_buf_size -
  1024.                         number_to_move - 1;
  1025. #endif
  1026.             }
  1027.  
  1028.         if ( num_to_read > YY_READ_BUF_SIZE )
  1029.             num_to_read = YY_READ_BUF_SIZE;
  1030.  
  1031.         /* Read in more data. */
  1032.         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  1033.             yy_n_chars, num_to_read );
  1034.         }
  1035.  
  1036.     if ( yy_n_chars == 0 )
  1037.         {
  1038.         if ( number_to_move - YY_MORE_ADJ == 1 )
  1039.             {
  1040.             ret_val = EOB_ACT_END_OF_FILE;
  1041.             yyrestart( yyin );
  1042.             }
  1043.  
  1044.         else
  1045.             {
  1046.             ret_val = EOB_ACT_LAST_MATCH;
  1047.             yy_current_buffer->yy_eof_status = EOF_PENDING;
  1048.             }
  1049.         }
  1050.  
  1051.     else
  1052.         ret_val = EOB_ACT_CONTINUE_SCAN;
  1053.  
  1054.     yy_n_chars += number_to_move;
  1055.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1056.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1057.  
  1058.     /* yytext begins at the second character in yy_ch_buf; the first
  1059.      * character is the one which preceded it before reading in the latest
  1060.      * buffer; it needs to be kept around in case it's a newline, so
  1061.      * yy_get_previous_state() will have with '^' rules active.
  1062.      */
  1063.  
  1064.     yytext_ptr = &yy_current_buffer->yy_ch_buf[1];
  1065.  
  1066.     return ret_val;
  1067.     }
  1068.  
  1069.  
  1070. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1071.  
  1072. static yy_state_type yy_get_previous_state()
  1073.     {
  1074.     register yy_state_type yy_current_state;
  1075.     register char *yy_cp;
  1076.  
  1077.     yy_current_state = yy_start;
  1078.  
  1079.     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  1080.         {
  1081.         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1082.         if ( yy_accept[yy_current_state] )
  1083.             {
  1084.             yy_last_accepting_state = yy_current_state;
  1085.             yy_last_accepting_cpos = yy_cp;
  1086.             }
  1087.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1088.             {
  1089.             yy_current_state = (int) yy_def[yy_current_state];
  1090.             if ( yy_current_state >= 132 )
  1091.                 yy_c = yy_meta[(unsigned int) yy_c];
  1092.             }
  1093.         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1094.         }
  1095.  
  1096.     return yy_current_state;
  1097.     }
  1098.  
  1099.  
  1100. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1101.  *
  1102.  * synopsis
  1103.  *    next_state = yy_try_NUL_trans( current_state );
  1104.  */
  1105.  
  1106. #ifdef YY_USE_PROTOS
  1107. static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
  1108. #else
  1109. static yy_state_type yy_try_NUL_trans( yy_current_state )
  1110. yy_state_type yy_current_state;
  1111. #endif
  1112.     {
  1113.     register int yy_is_jam;
  1114.     register char *yy_cp = yy_c_buf_p;
  1115.  
  1116.     register YY_CHAR yy_c = 1;
  1117.     if ( yy_accept[yy_current_state] )
  1118.         {
  1119.         yy_last_accepting_state = yy_current_state;
  1120.         yy_last_accepting_cpos = yy_cp;
  1121.         }
  1122.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1123.         {
  1124.         yy_current_state = (int) yy_def[yy_current_state];
  1125.         if ( yy_current_state >= 132 )
  1126.             yy_c = yy_meta[(unsigned int) yy_c];
  1127.         }
  1128.     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1129.     yy_is_jam = (yy_current_state == 131);
  1130.  
  1131.     return yy_is_jam ? 0 : yy_current_state;
  1132.     }
  1133.  
  1134.  
  1135. #ifdef YY_USE_PROTOS
  1136. static void yyunput( int c, register char *yy_bp )
  1137. #else
  1138. static void yyunput( c, yy_bp )
  1139. int c;
  1140. register char *yy_bp;
  1141. #endif
  1142.     {
  1143.     register char *yy_cp = yy_c_buf_p;
  1144.  
  1145.     /* undo effects of setting up yytext */
  1146.     *yy_cp = yy_hold_char;
  1147.  
  1148.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1149.         { /* need to shift things up to make room */
  1150.         /* +2 for EOB chars. */
  1151.         register int number_to_move = yy_n_chars + 2;
  1152.         register char *dest = &yy_current_buffer->yy_ch_buf[
  1153.                     yy_current_buffer->yy_buf_size + 2];
  1154.         register char *source =
  1155.                 &yy_current_buffer->yy_ch_buf[number_to_move];
  1156.  
  1157.         while ( source > yy_current_buffer->yy_ch_buf )
  1158.             *--dest = *--source;
  1159.  
  1160.         yy_cp += dest - source;
  1161.         yy_bp += dest - source;
  1162.         yy_n_chars = yy_current_buffer->yy_buf_size;
  1163.  
  1164.         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1165.             YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1166.         }
  1167.  
  1168.     if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
  1169.         yy_cp[-2] = '\n';
  1170.  
  1171.     *--yy_cp = (char) c;
  1172.  
  1173.  
  1174.     /* Note: the formal parameter *must* be called "yy_bp" for this
  1175.      * macro to now work correctly.
  1176.      */
  1177.     YY_DO_BEFORE_ACTION; /* set up yytext again */
  1178.     }
  1179.  
  1180.  
  1181. #ifdef __cplusplus
  1182. static int yyinput()
  1183. #else
  1184. static int input()
  1185. #endif
  1186.     {
  1187.     int c;
  1188.  
  1189.     *yy_c_buf_p = yy_hold_char;
  1190.  
  1191.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1192.         {
  1193.         /* yy_c_buf_p now points to the character we want to return.
  1194.          * If this occurs *before* the EOB characters, then it's a
  1195.          * valid NUL; if not, then we've hit the end of the buffer.
  1196.          */
  1197.         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1198.             /* This was really a NUL. */
  1199.             *yy_c_buf_p = '\0';
  1200.  
  1201.         else
  1202.             { /* need more input */
  1203.             yytext_ptr = yy_c_buf_p;
  1204.             ++yy_c_buf_p;
  1205.  
  1206.             switch ( yy_get_next_buffer() )
  1207.                 {
  1208.                 case EOB_ACT_END_OF_FILE:
  1209.                     {
  1210.                     if ( yywrap() )
  1211.                         {
  1212.                         yy_c_buf_p =
  1213.                         yytext_ptr + YY_MORE_ADJ;
  1214.                         return EOF;
  1215.                         }
  1216.  
  1217.                     YY_NEW_FILE;
  1218. #ifdef __cplusplus
  1219.                     return yyinput();
  1220. #else
  1221.                     return input();
  1222. #endif
  1223.                     }
  1224.  
  1225.                 case EOB_ACT_CONTINUE_SCAN:
  1226.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  1227.                     break;
  1228.  
  1229.                 case EOB_ACT_LAST_MATCH:
  1230. #ifdef __cplusplus
  1231.                     YY_FATAL_ERROR(
  1232.                     "unexpected last match in yyinput()" );
  1233. #else
  1234.                     YY_FATAL_ERROR(
  1235.                     "unexpected last match in input()" );
  1236. #endif
  1237.                 }
  1238.             }
  1239.         }
  1240.  
  1241.     c = *yy_c_buf_p;
  1242.     *yy_c_buf_p = '\0';    /* preserve yytext */
  1243.     yy_hold_char = *++yy_c_buf_p;
  1244.  
  1245.     return c;
  1246.     }
  1247.  
  1248.  
  1249. #ifdef YY_USE_PROTOS
  1250. void yyrestart( FILE *input_file )
  1251. #else
  1252. void yyrestart( input_file )
  1253. FILE *input_file;
  1254. #endif
  1255.     {
  1256.     if ( ! yy_current_buffer )
  1257.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  1258.  
  1259.     yy_init_buffer( yy_current_buffer, input_file );
  1260.     yy_load_buffer_state();
  1261.     }
  1262.  
  1263.  
  1264. #ifdef YY_USE_PROTOS
  1265. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  1266. #else
  1267. void yy_switch_to_buffer( new_buffer )
  1268. YY_BUFFER_STATE new_buffer;
  1269. #endif
  1270.     {
  1271.     if ( yy_current_buffer == new_buffer )
  1272.         return;
  1273.  
  1274.     if ( yy_current_buffer )
  1275.         {
  1276.         /* Flush out information for old buffer. */
  1277.         *yy_c_buf_p = yy_hold_char;
  1278.         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  1279.         yy_current_buffer->yy_n_chars = yy_n_chars;
  1280.         }
  1281.  
  1282.     yy_current_buffer = new_buffer;
  1283.     yy_load_buffer_state();
  1284.  
  1285.     /* We don't actually know whether we did this switch during
  1286.      * EOF (yywrap()) processing, but the only time this flag
  1287.      * is looked at is after yywrap() is called, so it's safe
  1288.      * to go ahead and always set it.
  1289.      */
  1290.     yy_did_buffer_switch_on_eof = 1;
  1291.     }
  1292.  
  1293.  
  1294. #ifdef YY_USE_PROTOS
  1295. void yy_load_buffer_state( void )
  1296. #else
  1297. void yy_load_buffer_state()
  1298. #endif
  1299.     {
  1300.     yy_n_chars = yy_current_buffer->yy_n_chars;
  1301.     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  1302.     yyin = yy_current_buffer->yy_input_file;
  1303.     yy_hold_char = *yy_c_buf_p;
  1304.     }
  1305.  
  1306.  
  1307. #ifdef YY_USE_PROTOS
  1308. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  1309. #else
  1310. YY_BUFFER_STATE yy_create_buffer( file, size )
  1311. FILE *file;
  1312. int size;
  1313. #endif
  1314.     {
  1315.     YY_BUFFER_STATE b;
  1316.  
  1317.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  1318.  
  1319.     if ( ! b )
  1320.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1321.  
  1322.     b->yy_buf_size = size;
  1323.  
  1324.     /* yy_ch_buf has to be 2 characters longer than the size given because
  1325.      * we need to put in 2 end-of-buffer characters.
  1326.      */
  1327.     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
  1328.  
  1329.     if ( ! b->yy_ch_buf )
  1330.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1331.  
  1332.     yy_init_buffer( b, file );
  1333.  
  1334.     return b;
  1335.     }
  1336.  
  1337.  
  1338. #ifdef YY_USE_PROTOS
  1339. void yy_delete_buffer( YY_BUFFER_STATE b )
  1340. #else
  1341. void yy_delete_buffer( b )
  1342. YY_BUFFER_STATE b;
  1343. #endif
  1344.     {
  1345.     if ( b == yy_current_buffer )
  1346.         yy_current_buffer = (YY_BUFFER_STATE) 0;
  1347.  
  1348.     yy_flex_free( (void *) b->yy_ch_buf );
  1349.     yy_flex_free( (void *) b );
  1350.     }
  1351.  
  1352.  
  1353. #ifdef YY_USE_PROTOS
  1354. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  1355. #else
  1356. void yy_init_buffer( b, file )
  1357. YY_BUFFER_STATE b;
  1358. FILE *file;
  1359. #endif
  1360.     {
  1361.     b->yy_input_file = file;
  1362.  
  1363.     /* We put in the '\n' and start reading from [1] so that an
  1364.      * initial match-at-newline will be true.
  1365.      */
  1366.  
  1367.     b->yy_ch_buf[0] = '\n';
  1368.     b->yy_n_chars = 1;
  1369.  
  1370.     /* We always need two end-of-buffer characters.  The first causes
  1371.      * a transition to the end-of-buffer state.  The second causes
  1372.      * a jam in that state.
  1373.      */
  1374.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1375.     b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
  1376.  
  1377.     b->yy_buf_pos = &b->yy_ch_buf[1];
  1378.  
  1379.     b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;
  1380.  
  1381.     b->yy_fill_buffer = 1;
  1382.  
  1383.     b->yy_eof_status = EOF_NOT_SEEN;
  1384.     }
  1385.  
  1386.  
  1387. #ifdef YY_USE_PROTOS
  1388. static void yy_push_state( int new_state )
  1389. #else
  1390. static void yy_push_state( new_state )
  1391. int new_state;
  1392. #endif
  1393.     {
  1394.     if ( yy_start_stack_ptr >= yy_start_stack_depth )
  1395.         {
  1396.         int new_size;
  1397.  
  1398.         yy_start_stack_depth += YY_START_STACK_INCR;
  1399.         new_size = yy_start_stack_depth * sizeof( int );
  1400.  
  1401.         if ( ! yy_start_stack )
  1402.             yy_start_stack = (int *) yy_flex_alloc( new_size );
  1403.  
  1404.         else
  1405.             yy_start_stack = (int *) yy_flex_realloc(
  1406.                     (void *) yy_start_stack, new_size );
  1407.  
  1408.         if ( ! yy_start_stack )
  1409.             YY_FATAL_ERROR(
  1410.             "out of memory expanding start-condition stack" );
  1411.         }
  1412.  
  1413.     yy_start_stack[yy_start_stack_ptr++] = YY_START;
  1414.  
  1415.     BEGIN(new_state);
  1416.     }
  1417.  
  1418.  
  1419. static void yy_pop_state()
  1420.     {
  1421.     if ( --yy_start_stack_ptr < 0 )
  1422.         YY_FATAL_ERROR( "start-condition stack underflow" );
  1423.  
  1424.     BEGIN(yy_start_stack[yy_start_stack_ptr]);
  1425.     }
  1426.  
  1427.  
  1428. static int yy_top_state()
  1429.     {
  1430.     return yy_start_stack[yy_start_stack_ptr - 1];
  1431.     }
  1432.  
  1433.  
  1434. #ifdef YY_USE_PROTOS
  1435. static void yy_fatal_error( const char msg[] )
  1436. #else
  1437. static void yy_fatal_error( msg )
  1438. char msg[];
  1439. #endif
  1440.     {
  1441.     (void) fprintf( stderr, "%s\n", msg );
  1442.     exit( 1 );
  1443.     }
  1444.  
  1445.  
  1446.  
  1447. /* Redefine yyless() so it works in section 3 code. */
  1448.  
  1449. #undef yyless
  1450. #define yyless(n) \
  1451.     do \
  1452.         { \
  1453.         /* Undo effects of setting up yytext. */ \
  1454.         yytext[yyleng] = yy_hold_char; \
  1455.         yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
  1456.         yy_hold_char = *yy_c_buf_p; \
  1457.         *yy_c_buf_p = '\0'; \
  1458.         yyleng = n; \
  1459.         } \
  1460.     while ( 0 )
  1461.  
  1462.  
  1463. /* Internal utility routines. */
  1464.  
  1465. #ifndef yytext_ptr
  1466. #ifdef YY_USE_PROTOS
  1467. static void yy_flex_strcpy( char *s1, const char *s2 )
  1468. #else
  1469. static void yy_flex_strcpy( s1, s2 )
  1470. char *s1;
  1471. const char *s2;
  1472. #endif
  1473.     {
  1474.     while ( (*(s1++) = *(s2++)) )
  1475.         ;
  1476.     }
  1477. #endif
  1478.  
  1479.  
  1480. #ifdef YY_USE_PROTOS
  1481. static void *yy_flex_alloc( unsigned int size )
  1482. #else
  1483. static void *yy_flex_alloc( size )
  1484. unsigned int size;
  1485. #endif
  1486.     {
  1487.     return (void *) malloc( size );
  1488.     }
  1489.  
  1490. #ifdef YY_USE_PROTOS
  1491. static void *yy_flex_realloc( void *ptr, unsigned int size )
  1492. #else
  1493. static void *yy_flex_realloc( ptr, size )
  1494. void *ptr;
  1495. unsigned int size;
  1496. #endif
  1497.     {
  1498.     return (void *) realloc( ptr, size );
  1499.     }
  1500.  
  1501. #ifdef YY_USE_PROTOS
  1502. static void yy_flex_free( void *ptr )
  1503. #else
  1504. static void yy_flex_free( ptr )
  1505. void *ptr;
  1506. #endif
  1507.     {
  1508.     free( ptr );
  1509.     }
  1510. # line 108 "field_l.l"
  1511.